home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1988 April
/
1988-04.d64
/
demo 3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
149 lines
5 rem******* scale = 319 by 239 ********
10 rem**********************************
20 rem**** build titles and outline ****
30 rem**********************************
40 rem
41 poke50913,1:poke50959,1
42 poke50918,0:poke50964,51
43 poke50923,0:poke50969,117
50 printchr$(8)+chr$(14):@2:@3
60 @4,0,116:@7,319,116,0:@8,0,116,13
70 @4,159,0:@7,159,239,0:@8,159,0,13
80 @4,319,239:@7,319,0,0
90 @7,0,0,0:@7,0,239,0
100 ch$=chr$(14)+chr$(18)+" [196][199][210][193][208][200] demo by [196]an [195]oy 5/87 "
110 @10,0,24,ch$
120 ch$=chr$(146)+"[204]ines:"
130 @10,1,23,ch$:@10,1,22,"[163][163][163][163][163][163]"
140 @10,1,11,"[198]ills:":@10,1,10,"[163][163][163][163][163][163]"
150 @10,21,23,"[212]ext:":@10,21,22,"[163][163][163][163][163]"
160 @10,21,11,"[199]raphics:":@10,21,10,"[163][163][163][163][163][163][163][163][163]"
170 rem
180 rem*********************************
190 rem*** draw example line styles ****
200 rem*********************************
210 rem
220 fori=0 to 8
230 s%=i:y%=215-(5*i)
240 @4,20,y%:@7,140,y%,s%
250 next i
260 fori=9 to 17
270 s%=i:y%=210-(5*i)
280 @4,140,y%:@7,20,y%,0:@8,140,y%,s%
290 next i
300 rem
310 rem*********************************
320 rem****** draw fill examples *******
330 rem*********************************
340 rem
350 @4,20,15:@7,140,15,0:@7,140,100,0
360 @7,20,100,0:@7,20,15,0
370 @4,40,35:@7,120,35,0:@7,120,80,0
380 @7,40,80,0:@7,40,35,0
390 @4,80,35:@7,80,80,0:@7,120,35,0
400 @4,40,58:@7,80,58,0
410 @9,60,65,0:@9,60,45,1
420 @9,90,45,4:@9,110,70,7
430 @9,80,20,8:@9,80,90,8
440 rem*********************************
450 rem***** print text crossword ******
460 rem*********************************
470 rem
480 ch$=chr$(142)+chr$(146)+"uppercase"
490 @11,27,21,ch$
500 for i=0to150:next i
510 ch$=chr$(14)+"lowercase"
520 @10,29,21,ch$
530 for i=0to150:next i
540 ch$=chr$(142)+chr$(18)+"reverse"
550 @10,26,13,ch$
560 for i=0to150:next i
570 ch$=chr$(146)+"normal"
580 @10,23,15,ch$
590 for i=0to150:next i
600 @10,25,17,"horizontal"
610 for i=0to150:next i
620 @11,33,23,"vertical"
630 for i=0to150:next i
640 rem*********************************
650 rem******** draw spaceship *********
660 rem*********************************
670 rem
680 ro=(NULL)/6:el=(NULL)/12
690 yc=0:zc=0:rc=10
700 fori=-50to10step20
710 xc=i:gosub1000
720 nexti
730 xc=20:rc=8:gosub1000
740 xc=40:yc=0:zc=30:rc=40:gosub1200
750 zc=35:gosub1200
760 zc=33:rc=5
770 fori=-70to-10step20
780 xc=i:yc=33:gosub1000:yc=-33:gosub1000
790 next i
795 fori=0to5
800 ag=(NULL)*i/3:xc=-50:yc=0:zc=0:rc=0:gosub1400:@4,x%,y%
805 rc=10:gosub1400:@7,x%,y%,0:xc=10:gosub1400:@7,x%,y%,0
810 rc=0:gosub1400:@7,x%,y%,0:xc=20:rc=8:gosub1400:@7,x%,y%,0
815 next i
820 fori=0to5
825 ag=(NULL)*(i/3+1/6):xc=40:yc=0:zc=30:rc=0:gosub1600:@4,x%,y%
830 rc=40:gosub1600:@7,x%,y%,0:zc=35:gosub1600:@7,x%,y%,0
835 rc=0:gosub1600:@7,x%,y%,0
840 next i
845 fori=0to3
850 ag=(NULL)*i/2:xc=-70:yc=33:zc=33:rc=0:gosub1400:@4,x%,y%
855 rc=5:gosub1400:@7,x%,y%,0:xc=-10:gosub1400:@7,x%,y%,0
860 rc=0:gosub1400:@7,x%,y%,0
865 xc=-70:yc=-33:zc=33:rc=0:gosub1400:@4,x%,y%
870 rc=5:gosub1400:@7,x%,y%,0:xc=-10:gosub1400:@7,x%,y%,0
875 rc=0:gosub1400:@7,x%,y%,0
880 next i
885 x=10:y=0:z=10:gosub2000:@4,x%,y%
890 x=30:z=30:gosub2000:@7,x%,y%,0
895 x=10:gosub2000:@7,x%,y%,0
900 x=-10:z=10:gosub2000:@7,x%,y%,0
905 x=10:gosub2000:@7,x%,y%,0
910 x=-20:y=7:z=7:gosub2000:@4,x%,y%
915 y=26:z=29:gosub2000:@7,x%,y%,0
920 x=-30:gosub2000:@7,x%,y%,0
925 y=7:z=7:gosub2000:@7,x%,y%,0
930 x=-20:gosub2000:@7,x%,y%,0
935 x=-20:y=-7:z=7:gosub2000:@4,x%,y%
940 y=-26:z=29:gosub2000:@7,x%,y%,0
945 x=-30:gosub2000:@7,x%,y%,0
950 y=-7:z=7:gosub2000:@7,x%,y%,0
955 x=-20:gosub2000:@7,x%,y%,0
960 rem*********************************
963 rem***** save, load, and print *****
965 rem*********************************
966 rem
968 fori=0to2500:nexti
970 print"[147][211]aving demomstration screen to disk...":@1:@12,"demo.dat"
975 @3:@2:@13,"demo.dat":open8,8,15,"s:demo.dat":close8:fori=0to2500:nexti
980 print"[147][208]rint demonstration screen (y/n)?":@1
983 getc$:if(c$="")goto983
986 if(c$<>"y")thenprint"[147]":end
988 @2:@14:print"[147]":@1:end
1000 dc=(NULL)/4:x=xc:y=yc:z=zc+rc
1010 gosub2000:@4,x%,y%
1020 for ag=dcto(2*(NULL)+dc)stepdc
1030 y=yc+rc*sin(ag):z=zc+rc*cos(ag)
1040 gosub2000:@7,x%,y%,0
1050 next ag
1060 return
1200 dc=(NULL)/12:y=yc:z=zc:x=xc+rc
1210 gosub2000:@4,x%,y%
1220 for ag=dcto(2*(NULL)+dc)stepdc
1230 x=xc+rc*cos(ag):y=yc+rc*sin(ag)
1240 gosub2000:@7,x%,y%,0
1250 next ag
1260 return
1400 x=xc:y=yc+rc*sin(ag):z=zc+rc*cos(ag):goto2000
1600 z=zc:x=xc+rc*cos(ag):y=yc+rc*sin(ag):goto2000
2000 sr=sin(ro):cr=cos(ro)
2010 se=sin(el):ce=cos(el)
2020 x%=x*cr-y*sr+242
2030 y%=z*ce-(y*cr+x*sr)*se+30
2040 return